package com.qfedu.dao;

import com.qfedu.entity.ListSong;
import com.qfedu.entity.Song;
import com.qfedu.entity.SongList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//@Mapper
public interface SongListDao {


    /**
     * 查找所有的歌单
     * @return
     */
    List<SongList> findAllSongList();

    /**
     * 根据类型，查询对应类型的歌单
     * @param style
     * @return
     */
//    @Select("select * from  song_list where style = #{style}")
    List<SongList> findSongStyleList(String style);

    List<ListSong> getListSongOfSongId(int songListId);

    List<Song> getSongOfId(int id);

    List<Song> getSongOfSingerId(int singerId);

    List<Song> getSongOfSingerName(String name);

    List<SongList> getSongListOfLikeTitle(String title);

    int updateSongMsg(Song song);

    int deleteSong(int id);

    int updateSongListMsg(SongList songList);

    /**
     * 删除歌单
     * @param id
     * @return
     */
    int deleteSongList(int id);

    //先查看是否已经存在
    ListSong findListSongBySongIdAndSongListId(ListSong listSong);

    /**
     * 给歌单添加歌曲
     * @param listSong
     * @return
     */
    int setListSong(ListSong listSong);

    int deleteListSong(int songId);

    int setSongList(SongList songList);

    List<Song> getAllSong();

}
